﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master"
    CodeBehind="details.aspx.vb" Inherits="photomania.details" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            color: #0000FF;
            font-weight: bold;
        }
        .style2
        {
            color: #0000FF;
        }
        .style3
        {
            font-weight: bold;
            background-color: #99CCFF;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <ajax:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </ajax:ToolkitScriptManager>
    <p class="style3">
        People thought this category was</p>

    <asp:BulletedList ID="BulletedList1" runat="server" DataSourceID="SqlDataSource4"
        DataTextField="Tag" DataValueField="Tag"></asp:BulletedList>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:photodb %>"
        ProviderName="<%$ ConnectionStrings:photodb.ProviderName %>" SelectCommand="SELECT DISTINCT [Tag], [pic_id] FROM [CatTagView] WHERE ([pic_id] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="pic_id" QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <p>
        <br />
    </p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="pic_id"
            DataSourceID="SqlDataSource1" BackColor="#DEBA84" BorderColor="#4B6C9E" BorderStyle="None"
            BorderWidth="1px" CellPadding="3" CellSpacing="2">
            <Columns>
                <asp:BoundField DataField="pic_id" HeaderText="Picture ID" InsertVisible="False"
                    ReadOnly="True" SortExpression="pic_id" />
                <asp:BoundField DataField="name" HeaderText="Name" SortExpression="name" />
                <asp:BoundField DataField="caption" HeaderText="Caption" SortExpression="caption" />
                <asp:ImageField DataImageUrlField="imagelocation" HeaderText="Image">
                    <ControlStyle Height="250px" Width="250px" />
                </asp:ImageField>
            </Columns>
            <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
            <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" />
            <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
            <RowStyle BackColor="#FFF7E7" ForeColor="#4b6c9e" />
            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#FFF1D4" />
            <SortedAscendingHeaderStyle BackColor="#B95C30" />
            <SortedDescendingCellStyle BackColor="#F1E5CE" />
            <SortedDescendingHeaderStyle BackColor="#93451F" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:photodb %>"
            ProviderName="<%$ ConnectionStrings:photodb.ProviderName %>" SelectCommand="SELECT * FROM [gallery] WHERE ([pic_id] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter DefaultValue="1" Name="pic_id" QueryStringField="id" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <br />
    <span class="style1">Picture Rating</span>
    <%--    <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal">
        <asp:ListItem Text="1" Value="1"></asp:ListItem>
        <asp:ListItem Text="2" Value="2"></asp:ListItem>
        <asp:ListItem Text="3" Value="3"></asp:ListItem>
        <asp:ListItem Text="4" Value="4"></asp:ListItem>
        <asp:ListItem Text="5" Value="5"></asp:ListItem>
    </asp:RadioButtonList>--%>
    <ajax:Rating ID="Rating1" runat="server" BorderStyle="Solid" BorderWidth="1px" 
        CurrentRating="0" EmptyStarCssClass="emptyRatingStar" 
        FilledStarCssClass="filledRatingStar" Height="40px" StarCssClass="ratingStar" 
        WaitingStarCssClass="savedRatingStar" Width="200px" OnChanged="RatingControlChanged" AutoPostBack ="true" >
    </ajax:Rating>
    <asp:Label ID="Label1" runat="server" Text="Sorry !!! You can only rate once." ForeColor ="Red" Visible="true" ></asp:Label>
    <p>
     <p>
         <span class="style2">
        <strong>Average Rating for this picture is </strong></span> :&nbsp;
        <asp:Label ID="lblAverageRatings" runat="server" Text="Label"></asp:Label>
    </p>
        New Tags Seperated By Comma</p>
    <p>
        <asp:TextBox ID="tb_NewTags" runat="server" Width="182px"></asp:TextBox>
    </p>
    <asp:CheckBoxList ID="CheckBoxList1" runat="server" DataSourceID="SqlDataSource3"
        DataTextField="Tag" DataValueField="ID" RepeatDirection="Horizontal">
    </asp:CheckBoxList>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:photodb %>"
        ProviderName="<%$ ConnectionStrings:photodb.ProviderName %>" SelectCommand="SELECT [ID], [Tag] FROM [Tags]">
    </asp:SqlDataSource>
    <asp:Button ID="Button2" runat="server" Text="Add Tag" />
    <br />
    <br />
    <p>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource2">
            <Columns>
                <asp:BoundField DataField="Author" HeaderText="user name" SortExpression="Author" />
                <asp:BoundField DataField="Subject" HeaderText="Subject" SortExpression="Subject" />
                <asp:BoundField DataField="Message" HeaderText="Message" SortExpression="Message" />
            </Columns>
            <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
            <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" />
            <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
            <RowStyle BackColor="#FFF7E7" ForeColor="#4b6c9e" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:photodb %>"
            ProviderName="<%$ ConnectionStrings:photodb.ProviderName %>" SelectCommand="SELECT [Author], [Subject], [Message] FROM [Comments] WHERE ([pic_id] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="pic_id" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        <b><span class="style2">Add Your Comment</span>
            <asp:LoginName ID="LoginName1" runat="server" />
        </b>
    </p>
    <p>
        <b>Title </b>
    </p>
    <p>
        <asp:TextBox ID="tb_Subject" runat="server" Width="294px"></asp:TextBox>
    </p>
    <p>
        <b>Your Comment</b></p>
    <p>
        <asp:TextBox ID="tb_Message" runat="server" Width="294px" TextMode="MultiLine"></asp:TextBox>
    </p>
    <p>
        <asp:Button ID="Button1" runat="server" Text="Submit" />
    </p>
    <p>
        &nbsp;</p>
    <p>
    </p>
</asp:Content>
